<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文件上传</title>
    <!-- 1. 引入bs的css样式-->
    <link rel="stylesheet" href="webjars/bootstrap/3.4.1/css/bootstrap.min.css">
    <!-- 2. 引入jquery依赖-->
    <script src="webjars/jquery/3.6.0/jquery.min.js"></script>
    <!--  3. 引入bs的js库-->
    <script src="webjars/bootstrap/3.4.1/js/bootstrap.min.js"></script>
    <style>
        .container{
            width: 600px;
            margin-top: 20px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title">文件上传</h3>
            </div>
            <div class="panel-body">
                <!--如果要进行文件上传，前端的表单必须要配置如下两个属性：-->
                <!--method="post" enctype="multipart/form-data"-->
                <form action="/user/upload.do" method="post" enctype="multipart/form-data">
                    <div class="form-group">
                        <label>请选择要上传的文件:</label>
                        <input type="file" name="mfile">
                        <p class="help-block">选择要上传的文件.</p>
                    </div>
                    <button type="submit" class="btn btn-default">上传</button>
                </form>
            </div>
            <div class="panel-footer text-right">
                百年智集团2000-2022.
            </div>
        </div>
    </div>
</body>
</html>